--- layout: documentation title: Malloy Documentation footer: /generated/footers/visualizations/shape_maps.html ---
The plugin currently supports US maps and state names. The model and data styles for the subsequent examples are:
export define airports is (explore 'malloy-data.faa.airports' primary key code airport_count is count(*) by_state is (reduce state airport_count ) );
Data Styles
{ "by_state": { "renderer": "shape_map" } }
explore airports | by_state
explore airports | reduce by_state
| by_state |
|---|
By calling the configured map as a nested subtable, a trellis is formed.
explore airports | reduce faa_region airport_count, by_state
| faa_region | airport_count | by_state |
|---|---|---|
| AGL | 4,437 | |
| ASW | 3,268 | |
| ASO | 2,924 | |
| AEA | 2,586 | |
| ANM | 2,102 |
explore airports | reduce faa_region airport_count, by_state heliports is by_state : [fac_type :'HELIPORT'] seaplane_bases is by_state : [fac_type :'SEAPLANE BASE']
| faa_region | airport_count | by_state | heliports | seaplane_bases |
|---|---|---|---|---|
| AGL | 4,437 | |||
| ASW | 3,268 | |||
| ASO | 2,924 | |||
| AEA | 2,586 | |||
| ANM | 2,102 |